<template>
  <div class="set-alert">
    <div class="time-picker-box">

    </div>
    <div class="btn-box" v-ev:tap.stop="[confirm]">
      <div class="btn">完成</div>
    </div>
    <iframe src="./static/logo.png" style="display:none"></iframe>
  </div>
</template>

<script>
  var Picker = require('../../../shared/components/picker.vue')
  // import SDK from '../../helpers/sdk'
  // import api from '../../api'
  import { globalMixins } from '../../mixins'

  export default {
    mixins: [globalMixins],

    components: {
      'time-picker': Picker
    },

    data () {
      return {
        value: ''
      }
    },
    computed: {
      type () {
        return this.$route.params.type
      },
      deviceId () {
        return this.$route.params.deviceId
      }
    },
    route: {
      data () {
        // 设置标题
        this.setTitle('告警规则')
      }
    },
    ready () {
    },
    methods: {
      /**
       * 完成按钮
       * @return {[type]} [description]
       */
      confirm () {
        console.log('确定')
      },
      /**
       * 用户改变时间
       * @param  {[type]} params [description]
       * @return {[type]}        [description]
       */
      valueChange (params) {
        var time = params.picker1.value + ':' + params.picker2.value
        this.log('切换时间为' + time)
        this.taskTime.hour = params.picker1.value
        this.taskTime.minute = params.picker2.value
      }
    }
  }
</script>

<style lang="stylus">
  @import '../../../shared/assets/style/common'

</style>
